package com.foreknow.elmboot.service.impl;

import com.foreknow.elmboot.mapper.FoodMapper;
import com.foreknow.elmboot.po.Business;
import com.foreknow.elmboot.po.Food;
import com.foreknow.elmboot.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class FoodServiceImpl implements FoodService {
    @Autowired
    private FoodMapper foodMapper;
    @Override
    public List<Food> listFoodByBusinessId(Integer businessId) {
        List<Food> foods=new ArrayList<>();
        try {
            foods=foodMapper.listFoodByBusinessId(businessId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return foods;
    }
}
